package com.example.controller;

import com.example.dao.impala.MpLaunchKuduDao;
import com.example.dao.kylin.AccountDao;
import com.example.dao.mysql.AccountMysqlDao;
import com.example.pojo.Account;
import com.example.pojo.AccountKylin;
import com.example.pojo.MpLaunchKudu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/* ━━━━━━佛祖保佑━━━━━━
 *                  ,;,,;
 *                ,;;'(    社
 *      __      ,;;' ' \   会
 *   /'  '\'~~'~' \ /'\.)  主
 * ,;(      )    /  |.     义
 *,;' \    /-.,,(   ) \    码
 *     ) /       ) / )|    农
 *     ||        ||  \)
 *     (_\       (_\
 * ━━━━━━永无BUG━━━━━━
 * @author ：zjq
 * @date ：2020/11/18 16:11
 * @description: TODO
 * @version: V1.0
 * @slogan: 天下风云出我辈，一入代码岁月催
 */
@RestController
@RequestMapping
public class TestController {

    //mysql
    @Autowired
    private AccountMysqlDao accountMysqlDao;

    // kylin
    @Autowired
    private AccountDao accountDao;

    // impala
    @Autowired
    private MpLaunchKuduDao mpLaunchKuduDao;

    @RequestMapping("mysql")
    public List<Account> testMysql() throws InterruptedException {
        List<Account> account = accountMysqlDao.getAccount(10004316);
        return account;
    }

    @RequestMapping("kylin")
    public List<AccountKylin> testKylin() {
        List<AccountKylin> account = accountDao.getAccount(10004316);
        return account;
    }


    @RequestMapping("impala")
    public List<MpLaunchKudu> testImpala() {
        List<MpLaunchKudu> list = mpLaunchKuduDao.getList();
        return list;
    }


}
